import request from './request';

// 创建房间
export const createRoom = (query: any) => {
  return request({
    url: '/OnlineVideo/video/createroom',
    method: 'get',
    params: query,
  });
};
// 获取userSig
export const getUserSig = () => {
  return request.get('/OnlineVideo/video/getUserSig');
};
// 预定会议
export const intendedMeeting = (query: any) => {
  return request({
    method: 'post',
    url: '/OnlineVideo/video/createIntendedMeeting',
    data: query,
  });
};
// 修改会议
export const editIntendedMeeting = (query: any) => {
  return request({
    method: 'put',
    url: '/OnlineVideo/video/editIntendedMeeting',
    data: query,
  });
};
// 获取我的会议列表
export const myMeetingList = (query: any) => {
  return request({
    method: 'get',
    url: '/OnlineVideo/video/getMyMeeting',
    params: query,
  });
};
// 获取会议列表
export const meetingList = (query: any) => {
  return request({
    method: 'get',
    url: '/OnlineVideo/video/getMeeting',
    params: query,
  });
};
// 删除会议
export const delMeeting = (id: number) => {
  return request({
    method: 'delete',
    url: '/OnlineVideo/video/IntendedMeeting',
    params: {
      id,
    },
  });
};
// 会议详情
export const reqMeetingDetail = (id: string) => {
  return request({
    method: 'get',
    url: '/OnlineVideo/video/' + id,
  });
};
// 判断会议是否存在
export const reqIsMeetingExist = (roomId: string) => {
  return request({
    method: 'get',
    url: '/OnlineVideo/video/getMeetingexist',
    params: {
      roomId,
    },
  });
};
